import { defineConfig } from "vite"//语法提示
import viteBaseConfig from "./vite.base.config";
import viteDevConfig from "./vite.dev.config";
import viteProdConfig from "./vite.prod.config";

const envResolver={
    "build":()=>{
        console.log('build')
        return {...viteBaseConfig,...viteProdConfig}
    },
    "serve":()=>{
        console.log('dev')
        return {...viteBaseConfig,...viteDevConfig}
    }
}

export default defineConfig(({command})=>{
   return envResolver[command]();
    
})